Embodiments of the present invention relate to Web applications, and in particular to techniques for manipulating uniform resource identifiers (URIs) on the client side of a Web application.
URI strings are often manipulated on the client side of Web-based applications. Such URI manipulations have become more complex with the recent widespread use of technologies such as XmlHttpRequests (XHRs) and Web Services for Remote Portlets (WSRP).
XHR is a Document Object Model (DOM) API that may be used inside a Web browser scripting language (such as Javascript) to send a hypertext transfer protocol (HTTP) request directly to a Web server and to load server response data directly back into the scripting language. When XHRs are used in Web portal applications (e.g., applications built using Oracle WebLogic Portal), URI strings may be rewritten into Javascript pseudo-protocol links. These Javascript pseudo-protocol links may invoke one or more Javascript functions to process the XHRs. For example, a URI string such as:                “http://www.oracle.com”may be rewritten into a Javascript pseudo-protocol link such as:        “javascript:com.mystuff.update(‘http://www.oracle.com’);return false;”Therefore, the original URI string “http://www.oracle.com” has now been rewritten to be included in the Javascript function call “javascript:com.mystuff.update( )”.        
WSRP is a network protocol standard designed for communicating with remote portlets. When WSRP portlets are used for Web applications, non-proxy URI strings may be rewritten into remote proxy URIs. A remote proxy URI includes a non-proxy URI (also referred to as a target URI) as part of its path or perhaps as a query parameter. For example, a non-proxy URI such as:                “http://www.oracle.com”may be rewritten into a remote proxy URI such as:        “http://proxy.eg.com/proxy/www.oracle.com”Therefore, a non-proxy URI string such as “http://www.oracle.com” has now been rewritten to be included in a remote proxy URI such as “http://proxy.eg.com/proxy/www.oracle.com”.        
In some cases, a URI string may be rewritten into both a Javascript pseudo-protocol link and a remote proxy URI. For example, a URI string such as                “http://www.oracle.com”may be written as:“javascript:com.mystuffupdate(‘http://proxy.eg.com/proxy/www.oracle.com’);return false;”        
Generally speaking, existing client-side URI manipulation frameworks cannot recognize URI strings that have been rewritten into Javascript pseudo-protocol links and/or remote proxy URIs as described above. Rather, these existing URI manipulation solutions can only be used for manipulating URI strings in their original forms (e.g., URI strings that have not been rewritten into Javascript pseudo-protocol links and/or remote proxy URIs). Accordingly, Web developers may have to develop new URI manipulation code specifically for manipulating URI strings that have been rewritten into Javascript pseudo-protocol links and/or remote proxy URIs, thereby increasing development cost and complexity.